package com.todo.member.infrastructure.mapper;

import com.todo.member.infrastructure.entity.condition.MemberLevelInfoCondition;
import com.todo.member.infrastructure.entity.po.MemberLevelInfoPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/1/21 16:21
 * @description
 */
@Mapper
public interface MemberLevelInfoMapper {
    MemberLevelInfoPO queryMemberLevelInfoPOByLevelCode(@Param("levelCode") String levelCode);

    MemberLevelInfoPO queryMemberLevelInfoPOById(@Param("id") Long id);

    int insertMemberLevelInfoPO(MemberLevelInfoPO memberLevelInfoPO);

    int removeMemberLevelInfoPOById(@Param("id") Long id);

    MemberLevelInfoPO queryMemberLevelInfoPOByName(@Param("name") String name);

    Boolean updateMemberLevelInfoStatusById(@Param("id") Long id, @Param("oldStatus") int oldStatus, @Param("newStatus") int newStatus);

    MemberLevelInfoPO queryMemberLevelByName(@Param("levelName") String levelName);

    Integer queryCountByCondition(MemberLevelInfoCondition memberLevelInfoCondition);

    List<MemberLevelInfoPO> queryMemberLevelInfoPOCondition(MemberLevelInfoCondition memberLevelInfoCondition);
}
